home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Yerk 3.6.6 / Supplement / Unsupported / Optionals / 3dArray < prev    next >
Encoding:
Text File  |  1986-01-22  |  1.3 KB  |  40 lines  |  [TEXT/MACA]

  1.  \ ( val x y z -- )
  2.     :M  TO: to: [ at: super ] ;M
  3.  
  4.     \ ( x y z -- )
  5.     :M  AT: at: [ at: super ] ;M
  6.  
  7.     \ ( -- )  Deallocate array space in heap
  8.     :M  DISPOSE:
  9.         ylimit: super 0
  10.         DO
  11.             xlimit: super 0
  12.             DO
  13.                       i j at: super killptr
  14.             LOOP
  15.         LOOP
  16.         dispose: super
  17.     ;M
  18.  
  19.     :M  XLIMIT: get: xbnd ;M
  20.  
  21.     :M  YLIMIT: xlimit: super ;M
  22.  
  23.     :M  ZLIMIT: ylimit: super ;M
  24.  
  25.     :M  PRINT:  { \ k -- }
  26.                 zlimit: self 0
  27.                 DO  CR ." layer:" i . CR
  28.                     i -> k
  29.                     ylimit: self 0
  30.                     DO  CR
  31.                         xlimit: self 0
  32.                         DO
  33.                             i j k at: self .
  34.                         LOOP
  35.                     LOOP
  36.                 LOOP
  37.     ;M
  38.  
  39. ;CLASS
  40.